package com.lzm.ydpt.mvp.modelimpl;

import com.byt.framlib.basemvp.basebean.BaseResponseBean;
import com.byt.framlib.basemvp.boby.FormBodys;
import com.google.gson.JsonArray;
import com.lzm.ydpt.entity.mall.GoodsOption;
import com.lzm.ydpt.entity.mall.ProductBean;
import com.lzm.ydpt.mvp.api.APIManager;
import com.lzm.ydpt.mvp.contract.ProductDetailsContract;

import io.reactivex.Observable;

/**
 * 类名称：XhXnProductDetailsModelImpl
 * 类描述：模型实现
 */
public class ProductDetailsModelImpl implements ProductDetailsContract.Model {

    @Override
    public Observable<BaseResponseBean<ProductBean>> onProductDetails(FormBodys formBodys) {
        return APIManager.getInstance().getAPIService().onProductDetails(formBodys);
    }

    @Override
    public Observable<BaseResponseBean<ProductBean>> onCollectionProduct(FormBodys formBodys) {
        return APIManager.getInstance().getAPIService().onCollectionProduct(formBodys);
    }

    @Override
    public Observable<BaseResponseBean<JsonArray>> onAddCartProduct(FormBodys formBodys) {
        return APIManager.getInstance().getAPIService().addCartProduct(formBodys);
    }

    @Override
    public Observable<BaseResponseBean<GoodsOption>> onProductOption(FormBodys formBodys) {
        return APIManager.getInstance().getAPIService().onProductOption(formBodys);
    }
}